public class ThreadDemo09 {
    public static void main(String[] args) {
        MyThread2 myThread2 = new MyThread2();
//        myThread2.setName("哈哈");
//        System.out.println(myThread2.getName());
        myThread2.start();
//        System.out.println(Thread.currentThread().getName());
    }
}

class MyThread2 extends Thread {
    @Override
    public void run() {
        System.out.println(Thread.currentThread());
        for (int i = 0; i < 100; i++) {
            System.out.println(i);
        }
    }
}
